package cn.wsalix.admin.entity;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import cn.anlaser.entity.SimpleEntity;

@Entity
@Table(name = "THIRD_LOGIN")
@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@DynamicUpdate
@DynamicInsert
@Data
@EqualsAndHashCode(callSuper = false)
@ToString(exclude = { "thirdPartType", "thirdUserId" })
public class ThirdLogin extends SimpleEntity {
	/**
	 * 
	 */
	private static final long serialVersionUID = 5039824154363811610L;
	@NotNull(message="{message.nickname.empty}")
	private String nickname;
	private String realName;
	private String onlineFlag;
	private String avatar;
	private String status;
	private Boolean locked = Boolean.FALSE;
	private String thirdPartType; //第三方账号类型
	private String thirdUserId; //第三方账号ID(1,微信 unionID,2,QQ openId 3,新浪 uid)

}